package com.intelligence.openfeign.service.deivce;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.intelligence.entity.pojo.Device;
import com.intelligence.entity.pojo.DeviceThresholdInfo;
import com.intelligence.entity.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * deviceLog的openFeign调用接口
 *
 * @Author : RulerWood
 * @Data : 2024/6/3 - 15:37
 */
@FeignClient(value = "system-device", contextId = "deviceThresholdInfo", path = "/device/deviceThresholdInfo")
public interface DeviceThresholdInfoFeignService {

    @GetMapping("/listDeviceThresholdInfo")
    Result<List<DeviceThresholdInfo>> listDeviceThresholdInfo();

    /**
     * 获取单个对象
     *
     * @param id 对象主键
     * @return
     */
    @GetMapping("/getOneDeviceThresholdInfo/{id}")
    Result<DeviceThresholdInfo> getOneDeviceThresholdInfo(@PathVariable(value = "id") Integer id);


    /**
     * 数据的新增
     *
     * @param deviceThresholdInfo 保存对象
     * @return
     */
    @PostMapping("/saveDeviceThresholdInfo")
    Result saveDeviceThresholdInfo(@RequestBody DeviceThresholdInfo deviceThresholdInfo);

    /**
     * 数据的修改
     *
     * @param deviceThresholdInfo 修改对象
     * @return
     */
    @PutMapping("/updateDeviceThresholdInfo")
    Result updateDeviceThresholdInfo(@RequestBody DeviceThresholdInfo deviceThresholdInfo);

    /**
     * 删除某条数据
     *
     * @param id 数据主键
     * @return
     */
    @DeleteMapping("/deleteDeviceThresholdInfo/{id}")
    Result deleteDeviceThresholdInfo(@PathVariable(value = "id") Integer id);

}
